|
|
|
|
|
|
|
Declare Function GetEnvironmentStrings Lib "kernel32" Alias
"GetEnvironmentStringsA" () As Long |
|
|
|
|
|
|
|
|
See Tutorial 6, "C++ Variables Meet Visual Basic," in Part III of this book. |
|
|
|
|
|
|
|
|
If you find yourself spending more than five minutes on this problem, take a break, then come back to it, keeping in mind that sometimes the most obvious problems are the most difficult to solve. |
|
|
|
|
|
|
|
|
The revised version of the GetKeyInfo function can be implemented in a single line of code. |
|
|
|
|
|
|
|
|
Oh, by the way, the version of GetKeyInfo shown here doesn't quite work. You might want to fix it first. |
|
|
|
|
|
|
|
|
All the information that you need to figure out the problem can be found in this puzzle. |
|
|
|
|
|
|
|
|
There are two bugs in this code. |
|
|
|
|
|
|
|
|
Sometimes fixing one bug will actually seem to make things worse. |
|
|
|
|
|
|
|
|
Try making a list of declarations that you would use for various data types. |
|
|
|
|
|
|
|
|
Did you know that it is possible to assign a byte array directly to a string? |
|
|
|
|
|